Referring now to FIG. 1, a typical digital image acquisition device 10 or a camera module for an image acquisition device comprises a lens 12 connected to an image sensor 14 which generates image information when exposed through the lens 12. Acquired image information is fed downstream from the sensor 14 to an image correction stage 16 where the raw image information is corrected for example, for color balancing or for distortion correction such as disclosed in WO 2014/005783 (Ref: FN-384), the disclosure of which is incorporated herein by reference. In FIG. 1, the image correction stage 16 is shown as a single block, however, it will be appreciated that this functionality can be implemented in many different ways either directly in an image processing pipeline connected to the sensor 14 or through processing image information stored in memory (not shown).
Acquired image information can be employed both for automatic exposure (AE) and automatic focus (AF) control 18. AE controls the timing 20 of the image sensor 14 to suitably expose captured images. AF automatically adjusts the lens 12 through its driver circuitry 22 to obtain focus on a subject at a given distance.
While some AF systems can either use separate contrast sensors within the camera to detect an optimal focus position (passive AF) or emit a signal to illuminate or estimate the distance to a subject before focussing at that distance (active AF), small multifunction devices such as mobile phones, tablet computers, personal digital assistants and portable music/video players, often do not include separate image and autofocus sensors and instead rely on acquired image information to perform autofocus.
Such multifunction devices typically use the focus driver 22 to successively set the position of the camera lens (or lens assembly) 12 to a specified number of lens positions or points of interest (POI) and evaluate focus (e.g. contrast) at one or more points in images acquired at each lens position to determine an optimal focus position—maximum contrast is assumed to correspond to maximum sharpness or “best” focus.
Employing points distributed across an image to measure contrast and assess focus is typically referred to as contrast detection auto-focus (CDAF). CDAF has limited utility in that it does not necessarily prioritize focus on one portion of an image of another. Even if CDAF were only performed on a specified region of an image, it also suffers in low-light conditions where image contrast is low. On the other hand, approaches such as face detection auto-focus (FDAF), for example, as explained in WO2016/000874 (Ref: FN-396), the disclosure of which is incorporated herein by reference, involve identifying a face region within an image and, using anthropometric data such as the known distance between eyes of between 65-70 mm, to achieve focus and maximize the sharpness of the face region. Other forms of subject feature for which the typical dimensions are known, for example, a car, can also provide the basis for an auto-focus mechanism and the present specification applies equally to such subject features. In any case, auto-focussing based face detection or face-equivalents can be quick by comparison to more traditional contrast based approaches and can also provide improved performance in low light conditions.
Nonetheless, whether using CDAF, FDAF or any equivalent scheme, performing a sweep through a number of POI to measure the sharpness of points in successive frames in a sequence with a view to determining which provides optimal focus can take some time and during this time, each acquired image being previewed before final image acquisition can appear blurred to a greater or lesser extent. This focus hunting process can be slow and visually unpleasant.
Some examples of methods which deal with images which include blurred features include:
“Facial Deblur Inference using Subspace Analysis for Recognition of Blurred Faces”, Masashi Nishiyama et al (http://research-srv.microsoft.com/pubs/140476/Final%20Version.pdf) which discloses using information derived from a training set of blurred faces where blurred faces degraded by the same PSF are similar to one another to provide statistical models representing predefined PSF sets in a feature space. A query image is deblurred using the PSF corresponding to that model so that the deblurred face might be recognised.
U.S. Pat. No. 8,797,448 (Ref: FN-363) which discloses acquiring a scene including multiple features with a digital image acquisition device; identifying a first group of pixels that correspond to a first feature within the scene; adjusting an optic in real time to a first focus position to focus the device on the first feature; and capturing a first digital image at the first focus position. A second group of pixels that correspond to a second feature within approximately the same scene is identified; the optic is adjusted in real time to a second focus position to focus the device on the second feature; and a second digital image is captured at the second focus position. The first and second digital images including the first and second features are registered; and either stored, transmitted, combined, captured or displayed together.
WO2012/041892 (Ref: FN-361) which discloses an autofocus method involving acquiring an image of a scene that includes one or more out of focus faces and/or partial faces. The method includes detecting one or more of the out of focus faces and/or partial faces within the digital image by applying one or more sets of classifiers trained on faces that are out of focus. One or more sizes of the one of more respective out of focus faces and/or partial faces is/are determined within the digital image. One or more respective depths is/are determined to the one or more out of focus faces and/or partial faces based on the one or more sizes of the one of more faces and/or partial faces within the digital image. One or more respective focus positions of the lens is/are adjusted to focus approximately at the determined one or more respective depths.
It will be appreciated that there are number of factors, other than lens position, which can contribute to whether or not an acquired image appears sharp including: camera shake (hand motion, vehicle motion, etc.); and subject motion during the exposure time of an image. Also, it will be appreciated that any sharpness measure based on an image feature such as a face will be impacted by:                Face type (hair colour, amount of hair on the face, glasses, etc.);        Distance to the subject;        Ambient light type/level (ISO level/noise, etc.); or        Lens sharpness function model.        
So while it can be possible to determine a lens POI providing a maximum contrast and so optimal focus for a feature such as a face, it is not possible to determine from an absolute contrast or sharpness measurement whether or not an image or image feature is in optimal focus.
As such, AF systems continue to suffer from focus hunting artefacts.